<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: EhcCommandTasks
  
    &mdash; Documentation by YARD 0.8.7.6
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '';
  framesUrl = "frames.html#!EhcCommandTasks.html";
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (E)</a> &raquo;
    
    
    <span class="title">EhcCommandTasks</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: EhcCommandTasks
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">EhcCommandTasks</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/ehc_command_tasks.rb</dd>
  
</dl>
<div class="clear"></div>


  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="COMMAND_WHITELIST-constant" class="">COMMAND_WHITELIST =
          
        </dt>
        <dd><pre class="code"><span class='qwords_beg'>%w(</span><span class='tstring_content'>init</span><span class='words_sep'> </span><span class='tstring_content'>generate</span><span class='words_sep'> </span><span class='tstring_content'>server</span><span class='words_sep'> </span><span class='tstring_content'>help</span><span class='words_sep'>)</span></pre></dd>
      
        <dt id="HELP_MESSAGE-constant" class="">HELP_MESSAGE =
          
        </dt>
        <dd><pre class="code"><span class='heredoc_beg'>&lt;&lt;-EOT</span>
<span class='tstring_content'>  Usage: ehc COMMAND [ARGS]

  The avalible commands are:
  init      Initialize &#39;dev_root&#39; and &#39;web_root&#39; with a demo website
  generate  Only generate output files  (short-cut alias: &quot;g&quot;)
  server    Start the wserver (short-cut alias: &quot;s&quot;)
  help      Shows this message

</span><span class='heredoc_end'>EOT</span></pre></dd>
      
    </dl>
  







  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#generate-instance_method" title="#generate (instance method)">- (Object) <strong>generate</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#help-instance_method" title="#help (instance method)">- (Object) <strong>help</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#init-instance_method" title="#init (instance method)">- (Object) <strong>init</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (EhcCommandTasks) <strong>initialize</strong> </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A new instance of EhcCommandTasks.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_command-instance_method" title="#parse_command (instance method)">- (Object) <strong>parse_command</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#print_error-instance_method" title="#print_error (instance method)">- (Object) <strong>print_error</strong>(command) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#server-instance_method" title="#server (instance method)">- (Object) <strong>server</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="EhcCommandTasks (class)">EhcCommandTasks</a></span></tt>) <strong>initialize</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a new instance of EhcCommandTasks</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


18
19
20
21
22
23
24
25</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 18</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
  <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_command'>parse_command</span>
  <span class='kw'>if</span> <span class='const'>COMMAND_WHITELIST</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="generate-instance_method">
  
    - (<tt>Object</tt>) <strong>generate</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


62
63
64
65</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 62</span>

<span class='kw'>def</span> <span class='id identifier rubyid_generate'>generate</span>
  <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>generator/generator</span><span class='tstring_end'>&#39;</span></span>
  <span class='const'>Generator</span><span class='op'>::</span><span class='const'>Generator</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="help-instance_method">
  
    - (<tt>Object</tt>) <strong>help</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


49
50
51</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 49</span>

<span class='kw'>def</span> <span class='id identifier rubyid_help'>help</span>
  <span class='id identifier rubyid_puts'>puts</span> <span class='const'>HELP_MESSAGE</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="init-instance_method">
  
    - (<tt>Object</tt>) <strong>init</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


53
54
55
56
57
58
59
60</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 53</span>

<span class='kw'>def</span> <span class='id identifier rubyid_init'>init</span>
  <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Creating dev_root and web_root with sample website</span><span class='tstring_end'>&quot;</span></span>

  <span class='id identifier rubyid_init_dev_root'>init_dev_root</span>
  <span class='id identifier rubyid_init_web_root'>init_web_root</span>

  <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>All done, use &#39;ehc server&#39; to start the development server.</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="parse_command-instance_method">
  
    - (<tt>Object</tt>) <strong>parse_command</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


27
28
29
30
31
32
33
34
35
36
37
38</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 27</span>

<span class='kw'>def</span> <span class='id identifier rubyid_parse_command'>parse_command</span>
  <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='const'>ARGV</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>

  <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span>  <span class='const'>ARGV</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>

  <span class='kw'>if</span> <span class='id identifier rubyid_command'>command</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>g</span><span class='tstring_end'>&#39;</span></span>
    <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>generate</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>elsif</span> <span class='id identifier rubyid_command'>command</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s</span><span class='tstring_end'>&#39;</span></span>
    <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>server</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>end</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_command'>command</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="print_error-instance_method">
  
    - (<tt>Object</tt>) <strong>print_error</strong>(command) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


40
41
42
43
44
45
46
47</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 40</span>

<span class='kw'>def</span> <span class='id identifier rubyid_print_error'>print_error</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
    <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>no command given</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>command &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_command'>command</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; not valid</span><span class='tstring_end'>&quot;</span></span>
  <span class='kw'>end</span> <span class='kw'>if</span>
  <span class='id identifier rubyid_help'>help</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="server-instance_method">
  
    - (<tt>Object</tt>) <strong>server</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


67
68
69
70</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ehc_command_tasks.rb', line 67</span>

<span class='kw'>def</span> <span class='id identifier rubyid_server'>server</span>
  <span class='gvar'>$options</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_server_options'>parse_server_options</span>
  <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>easy_html_creator</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Sun Dec 21 19:55:50 2014 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.6 (ruby-2.1.3).
</div>

  </body>
</html>